class Book < ActiveRecord::Base
  belongs_to :collection
  has_many :user_book
  
  attr_accessible :description, :isbn, :price, :title, :collection_id
  attr_accessor :collection
  validates :title,  :presence => true, :length => { :minimum => 1 }
  validates :collection_id, :presence => true
  
  
  def to_s
    "#{title}"
  end
  
end
